<?php
    $ch=curl_init();
    $data=['name'=>12,'age'=>'邓攀'];
    curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1:80/p1.php");     
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Expect: "));
    curl_setopt($ch,CURLOPT_HTTPHEADER,
                array('Host: http://dplord.com',
                      'Referer: http://www.oschina.net/news/54622/magic-linux-3-0-5',
                      'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0'
                    )   
    );  
    $output = curl_exec($ch);
    curl_close($ch);